import moment from "moment";

export function getLastWeek(i) {
  let weekOfDay = parseInt(moment().format('E'));//计算今天是这周第几天
  let last_monday = moment().subtract(weekOfDay + 7 * i - 1, 'days').format('yyyy-MM-DD');//周一日期
  let last_sunday = moment().subtract(weekOfDay + 7 * (i - 1), 'days').format('yyyy-MM-DD');//周日日期
  return [last_monday, last_sunday]
}

export function noWorkDay() {
  return [
    "2024-08-04",
    "2024-08-10",
    "2024-08-11",
    "2024-08-17",
    "2024-08-18",
    "2024-08-24",
    "2024-08-25",
    "2024-08-31",
    "2024-09-01",
    "2024-09-07",
    "2024-09-08",
    "2024-09-15",
    "2024-09-16",
    "2024-09-17",
    "2024-09-21",
    "2024-09-22",
    "2024-09-28",
    "2024-10-05",
    "2024-10-06",
    "2024-10-01",
    "2024-10-02",
    "2024-10-03",
    "2024-10-04",
    "2024-10-07",
    "2024-10-13",
    "2024-10-19",
    "2024-10-20",
    "2024-10-26",
    "2024-10-27",
    "2024-11-02",
    "2024-11-03",
    "2024-11-09",
    "2024-11-10",
    "2024-11-16",
    "2024-11-17",
    "2024-11-23",
    "2024-11-24",
    "2024-11-30",
    "2024-12-01",
    "2024-12-07",
    "2024-12-08",
    "2024-12-14",
    "2024-12-15",
    "2024-12-21",
    "2024-12-22",
    "2024-12-28",
    "2024-12-29"
  ]
}

export function getDay24() {
  return [
    {
      "name": "立春",
      "day": "2024-02-04"
    },
    {
      "name": "雨水",
      "day": "2024-02-19"
    },
    {
      "name": "惊蛰",
      "day": "2024-03-05"
    },
    {
      "name": "春分",
      "day": "2024-03-20"
    },
    {
      "name": "清明",
      "day": "2024-04-04"
    },
    {
      "name": "谷雨",
      "day": "2024-04-19"
    },
    {
      "name": "立夏",
      "day": "2024-05-05"
    },
    {
      "name": "小满",
      "day": "2024-05-20"
    },
    {
      "name": "芒种",
      "day": "2024-06-05"
    },
    {
      "name": "夏至",
      "day": "2024-06-21"
    },
    {
      "name": "小暑",
      "day": "2024-07-07"
    },
    {
      "name": "大暑",
      "day": "2024-07-22"
    },
    {
      "name": "立秋",
      "day": "2024-08-07"
    },
    {
      "name": "处暑",
      "day": "2024-08-22"
    },
    {
      "name": "白露",
      "day": "2024-09-07"
    },
    {
      "name": "秋分",
      "day": "2024-09-22"
    },
    {
      "name": "寒露",
      "day": "2024-10-08"
    },
    {
      "name": "霜降",
      "day": "2024-10-23"
    },
    {
      "name": "立冬",
      "day": "2024-11-07"
    },
    {
      "name": "小雪",
      "day": "2024-11-22"
    },
    {
      "name": "大雪",
      "day": "2024-12-07"
    },
    {
      "name": "冬至",
      "day": "2024-12-21"
    },
    {
      "name": "小寒",
      "day": "2025-01-05"
    },
    {
      "name": "大寒",
      "day": "2025-01-20"
    },
    {
      "name": "立春",
      "day": "2025-02-04"
    },
    {
      "name": "雨水",
      "day": "2025-02-19"
    },
    {
      "name": "惊蛰",
      "day": "2025-03-05"
    },
    {
      "name": "春分",
      "day": "2025-03-20"
    },
    {
      "name": "清明",
      "day": "2025-04-04"
    },
    {
      "name": "谷雨",
      "day": "2025-04-19"
    },
    {
      "name": "立夏",
      "day": "2025-05-05"
    },
    {
      "name": "小满",
      "day": "2025-05-20"
    },
    {
      "name": "芒种",
      "day": "2025-06-05"
    },
    {
      "name": "夏至",
      "day": "2025-06-21"
    },
    {
      "name": "小暑",
      "day": "2025-07-07"
    },
    {
      "name": "大暑",
      "day": "2025-07-22"
    },
    {
      "name": "立秋",
      "day": "2025-08-07"
    },
    {
      "name": "处暑",
      "day": "2025-08-22"
    },
    {
      "name": "白露",
      "day": "2025-09-07"
    },
    {
      "name": "秋分",
      "day": "2025-09-22"
    },
    {
      "name": "寒露",
      "day": "2025-10-08"
    },
    {
      "name": "霜降",
      "day": "2025-10-23"
    },
    {
      "name": "立冬",
      "day": "2025-11-07"
    },
    {
      "name": "小雪",
      "day": "2025-11-22"
    },
    {
      "name": "大雪",
      "day": "2025-12-07"
    },
    {
      "name": "冬至",
      "day": "2025-12-21"
    }
  ];
}
